import 'package:flutter/material.dart';
import 'package:moose_app/ui/values/values.dart';
import 'package:moose_app/ui/widgets/user/user_avatar.dart';

class ATHDetailUserInfo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return _buildUserInfo(context);
  }

  Widget _buildUserInfo(context) {
    return Container(
      width: MediaQuery.of(context).size.width,
      child: Container(
        margin: EdgeInsets.symmetric(horizontal: kSize20),
        child: Column(
          children: [
            Container(
              margin: EdgeInsets.symmetric(vertical: kSize20),
              child: Row(
                children: [
                  ATHUserAvatar(
                    size: kSize180,
                    borderWidth: kSize2,
                  ),
                  Container(
                    margin: EdgeInsets.only(left: kSize20),
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.start,
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Text(
                          "江景",
                          style: TextStyle(
                              color: Colors.white, fontSize: kFontSize36),
                        ),
                        Text(
                          "M 号：8928328013901",
                          style: TextStyle(color: Colors.white),
                        ),
                        Container(
                          padding: EdgeInsets.symmetric(vertical: kSize20),
                          child: Row(
                            children: [
                              Container(
                                height: kSize40,
                                padding:
                                    EdgeInsets.symmetric(horizontal: kSize20),
                                alignment: Alignment.center,
                                margin: EdgeInsets.only(right: kSize10),
                                decoration: BoxDecoration(
                                    color: kColor66,
                                    borderRadius: BorderRadius.all(
                                        Radius.circular(kSize80))),
                                child: Text(
                                  "Male",
                                  style: TextStyle(
                                      color: Colors.white,
                                      fontSize: kFontSize22),
                                ),
                              ),
                              Container(
                                height: kSize40,
                                alignment: Alignment.center,
                                padding:
                                    EdgeInsets.symmetric(horizontal: kSize20),
                                margin: EdgeInsets.only(right: kSize10),
                                decoration: BoxDecoration(
                                    color: kColor66,
                                    borderRadius: BorderRadius.all(
                                        Radius.circular(kSize80))),
                                child: Text(
                                  "北京",
                                  style: TextStyle(
                                      color: Colors.white,
                                      fontSize: kFontSize22),
                                ),
                              ),
                              Container(
                                height: kSize40,
                                alignment: Alignment.center,
                                padding:
                                    EdgeInsets.symmetric(horizontal: kSize20),
                                decoration: BoxDecoration(
                                    color: kColor66,
                                    borderRadius: BorderRadius.all(
                                        Radius.circular(kSize80))),
                                child: Text(
                                  "吃饭了吗？",
                                  style: TextStyle(
                                      color: Colors.white,
                                      fontSize: kFontSize22),
                                ),
                              ),
                            ],
                          ),
                        )
                      ],
                    ),
                  )
                ],
              ),
            ),
            Container(
              margin: EdgeInsets.symmetric(vertical: kSize20),
              child: Row(
                children: [
                  Text(
                    "你喜欢吃饭吗？🐷",
                    style:
                        TextStyle(color: Colors.white, fontSize: kFontSize32),
                  )
                ],
              ),
            ),
            Container(
              margin: EdgeInsets.symmetric(vertical: kSize20),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Row(
                    children: [
                      _buildItem(),
                      _buildItem(),
                      _buildItem(),
                    ],
                  ),
                  Row(
                    children: [
                      Container(
                          width: kSize220,
                          height: kSize70,
                          alignment: Alignment.center,
                          decoration: BoxDecoration(
                              color: kColorEB3F4A,
                              borderRadius:
                                  BorderRadius.all(Radius.circular(kSize80))),
                          child: Text(
                            "关注",
                            textAlign: TextAlign.center,
                            style: TextStyle(
                                color: Colors.white, fontSize: kFontSize30),
                          )),
                      Container(
                          width: kSize120,
                          height: kSize70,
                          alignment: Alignment.center,
                          decoration: BoxDecoration(
                              color: kColor66,
                              border: Border.all(color: Colors.white),
                              borderRadius:
                                  BorderRadius.all(Radius.circular(kSize80))),
                          margin: EdgeInsets.only(left: kSize20),
                          child: Text(
                            "私信",
                            style: TextStyle(color: Colors.white),
                          ))
                    ],
                  )
                ],
              ),
            )
          ],
        ),
      ),
    );
  }

  Widget _buildItem() {
    return Container(
      margin: EdgeInsets.only(right: kSize40),
      child: Column(
        children: [
          Text(
            "998",
            style: TextStyle(color: Colors.white, fontSize: kFontSize34),
          ),
          Text(
            "关注",
            style: TextStyle(color: Colors.white),
          )
        ],
      ),
    );
  }
}
